<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="./jquery-1.10.2.min.js"></script>
</head>
<body>
    <h1 onclick="submit()" style="cursor:pointer">jsonp请求数据</h1>
</body>
<script>
    function submit() {
        var cna = getCookie('THIRD-ACESS-CNA');
        console.log(cna);

        $.ajax({
            type : "GET",
            async : false,
            url : "http://192.168.1.46:8088/richfun_cloud/thirdAcess/getAuthToken.html",
            dataType : "jsonp",//数据类型为jsonp
            success : function(data) {
                console.log(data);
            },
            error : function() {
                alert('fail');
            }
        });
    }

    function getCookie(name) {
        var arr, reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
        if(arr=document.cookie.match(reg))
            return unescape(arr[2]);
        else
            return null;
    }
</script>